/**
 *
 */
package com.javademos.train.dynamicdatasource;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.Import;

import com.javademos.train.dynamicdatasource.datasources.DynamicDataSourceConfig;

/**
 * @Description: [ 主程序 ]
 * <p>
 * 访问 ： http://localhost/javademos-web/
 * d端口 ；80
 */
@SpringBootApplication(exclude = { //
        DataSourceAutoConfiguration.class// **非常关键** 屏蔽自带的数据源自动加载
})
@Import({DynamicDataSourceConfig.class})
public class DynamicDatasourceApplication {

    public static void main(String[] args) throws Exception {
        new SpringApplicationBuilder(DynamicDatasourceApplication.class).web(true).run(args);
    }
}
